<style lang="scss">
  .portlet {
    .el-card__header {
      padding-top: 5px;
      padding-bottom: 5px;
    }
    .header {
      line-height: 40px;
      .title-text {
        font-size: 16px;
      }
    }
  }
</style>
<template>
  <el-card class="portlet">
    <div v-if="title || $slots.tools || $slots.header" slot="header" class="clearfix header">
      <slot name="header">
        <div class="pull-left title-text">
          <span>{{ title }}</span>
        </div>
      </slot>

      <div v-if="$slots.tools" class="pull-right">
        <slot name="tools"></slot>
      </div>
    </div>

    <slot></slot>
  </el-card>
</template>
<script>
export default {
  name: 'BasePortlet',
  props: {
    title: {
      type: String,
      default: ''
    }
  }
}
</script>
